﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Admin.NET.Friend.Util
{
    public class ConstellationHelper
    {
        /// <summary>
        /// 根据月日获取星座
        /// </summary>
        /// <param name="month"></param>
        /// <param name="day"></param>
        /// <returns></returns>
        static string GetConstellation(int month, int day)
        {
            string constellation = "未知";
            if ((month == 1 && day >= 20) || (month == 2 && day <= 18))
            {
                constellation = "水瓶座";
            }
            else if ((month == 2 && day >= 19) || (month == 3 && day <= 20))
            {
                constellation = "双鱼座";
            }
            else if ((month == 3 && day >= 21) || (month == 4 && day <= 19))
            {
                constellation = "白羊座";
            }
            else if ((month == 4 && day >= 20) || (month == 5 && day <= 20))
            {
                constellation = "金牛座";
            }
            else if ((month == 5 && day >= 21) || (month == 6 && day <= 21))
            {
                constellation = "双子座";
            }
            else if ((month == 6 && day >= 22) || (month == 7 && day <= 22))
            {
                constellation = "巨蟹座";
            }
            else if ((month == 7 && day >= 23) || (month == 8 && day <= 22))
            {
                constellation = "狮子座";
            }
            else if ((month == 8 && day >= 23) || (month == 9 && day <= 22))
            {
                constellation = "处女座";
            }
            else if ((month == 9 && day >= 23) || (month == 10 && day <= 23))
            {
                constellation = "天秤座";
            }
            else if ((month == 10 && day >= 24) || (month == 11 && day <= 21))
            {
                constellation = "天蝎座";
            }
            else if ((month == 11 && day >= 22) || (month == 12 && day <= 21))
            {
                constellation = "射手座";
            }
            else if ((month == 12 && day >= 22) || (month == 1 && day <= 19))
            {
                constellation = "摩羯座";
            }
            return constellation;
        }
    }
}
